package com.yaoyong.yy_demo.module.quartz.service;

import com.yaoyong.yy_demo.module.quartz.entity.DemoQuartzJob;
import com.baomidou.mybatisplus.extension.service.IService;
import org.quartz.SchedulerException;

import java.util.List;

/**
 * <p>
 * 定时任务表 服务类
 * </p>
 *
 * @author yy
 * @since 2021-01-06
 */
public interface IDemoQuartzJobService extends IService<DemoQuartzJob> {

    List<DemoQuartzJob> findByJobClassName(String jobClassName);

    Boolean saveAndScheduleJob(DemoQuartzJob quartzJob);

    Boolean editAndScheduleJob(DemoQuartzJob quartzJob) throws SchedulerException;

    Boolean deleteAndStopJob(DemoQuartzJob quartzJob);

    boolean pause(DemoQuartzJob quartzJob);

    boolean resumeJob(DemoQuartzJob quartzJob);

}
